package service

import (
	"context"
	"video-api/internal/model/input"
	"video-api/internal/model/out"
)

// IShortDramaService 接口定义
type IShortDramaService interface {
	GetList(context.Context, *input.ShortDramaList) ([]*out.ShortDramaEntity, int, error)
	GetDetail(context.Context, *input.ShortDramaDetail) (*out.ShortDramaEntity, error)
	EpisodesPlayEvent(context.Context, *input.ShortDramaEpisodesPlayEvent) error
	GetShortDramaEpisodes(context.Context, *input.ShortDramaEpisodes) ([]*out.ShortDramaEpisodesDetail, error)
	Collect(context.Context, *input.ShortDramaCollect) (bool, error)
	GetCollectList(context.Context, *input.ShortDramaCollectList) ([]*out.ShortDramaEntity, error)
	GetHistoryList(context.Context, *input.ShortDramaHistoryList) ([]*out.ShortDramaHistoryEntity, int, error)
	RmHistoryRecord(context.Context, int) (bool, error)
	GetShortDramaEpisodeById(context.Context, *input.ShortDramaEpisodes) (*out.ShortDramaEpisodesDetail, error)
}

var shortDramaInstance IShortDramaService

func ShortDramaService() IShortDramaService {
	if shortDramaInstance == nil {
		panic("shortDramaInstance is not initialized.")
	}
	return shortDramaInstance
}

func RegisterShortDramaService(s IShortDramaService) {
	shortDramaInstance = s
}
